define(['app'], function(app) {
	'use strict';

	// 实例化方法
	var factory = function(Http) {

		//返回信息
		return {
			//新品赠送
			get_test_list: function(nPage, act_type,callback,calldone) {
				Http.post({
					method: 'marketing.giving.goodslist',
					nPage:nPage,
					act_type:act_type,
					pagelimit:10
				}, function(result) {
					//请求成功
					if(callback) {
						callback(result.result,result.process_time);
					}
				}, function(e) {
					//请求异常
				}, function() {
					if(calldone)
						calldone();
				});
			},
			//轮播图
			getBannerList: function(callback) {
				Http.post({
					method: 'marketing.banner.getlist',
					act_type:6
				}, function(result) {
					if(callback) {
						callback(result);
					}
				}, function(e) {
					//请求异常
				}, function() {
					
				});
			}
			
			
		};
	}

	factory.$inject = [ 'Http' ];
	return app.registerService("Newgive", factory);
});